package com.example.demo.Controller;

import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/test")
public class TestController {
    @RequestMapping(path = "/sayhi", method = RequestMethod.GET)
    public String sayHi(){
        return "你好 Spring MVC";
    }

    @GetMapping("/sayhi2")
    public String sayHi2(){
        return "Hey You!";
    }

    @PostMapping("/sayhi3")
    public String sayHi3(){
        return "Yo Ho~~ Beauty~";
    }
}
